<?php
	/**
	* Remove user from user list of files explorer access
	*/
	if (!defined('EXPONENT')) exit('');
	if (exponent_permissions_check(array('administrate','configure'),$loc))
	{

		$fuser = null;
		if (isset($_REQUEST['id'])) {
			$fuser = $db->selectObject('filemanagermodule_users','id='.intval($_REQUEST['id']));
			
		}	
		if ($fuser) {
			if (exponent_permissions_check('delete',$loc)) {
				$db->delete('filemanagermodule_users','id='.$fuser->id);
				echo "OK";
			} else {
				echo SITE_403_HTML;
			}
		}
		
	}
	else {
		echo SITE_404_HTML;
	}

?>
